class MallGoodsSpuEsModel {
  List<Records>? records;
  int? total;
  int? size;
  int? current;
  int? pages;

  MallGoodsSpuEsModel({
    this.records,
    this.total,
    this.size,
    this.current,
    this.pages,
  });

  MallGoodsSpuEsModel.fromJson(Map<String, dynamic> json) {
    if (json["records"] is List) {
      records =
          json["records"] == null
              ? null
              : (json["records"] as List)
                  .map((e) => Records.fromJson(e))
                  .toList();
    }
    if (json["total"] is num) {
      total = (json["total"] as num).toInt();
    }
    if (json["size"] is num) {
      size = (json["size"] as num).toInt();
    }
    if (json["current"] is num) {
      current = (json["current"] as num).toInt();
    }
    if (json["pages"] is num) {
      pages = (json["pages"] as num).toInt();
    }
  }

  static List<MallGoodsSpuEsModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(MallGoodsSpuEsModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if (records != null) {
      _data["records"] = records?.map((e) => e.toJson()).toList();
    }
    _data["total"] = total;
    _data["size"] = size;
    _data["current"] = current;
    _data["pages"] = pages;
    return _data;
  }
}

class Records {
  String? id;
  String? skuId;
  String? goodsName;
  String? storeId;
  String? storeName;
  int? buyCount;
  String? small;
  String? thumbnail;
  String? brandId;
  dynamic brandName;
  dynamic brandUrl;
  String? categoryPath;
  String? categoryNamePath;
  String? storeCategoryPath;
  dynamic storeCategoryNamePath;
  double? price;
  dynamic promotionPrice;
  dynamic point;
  int? commentNum;
  dynamic highPraiseNum;
  int? grade;
  String? intro;
  String? mobileIntro;
  bool? selfOperated;
  bool? recommend;
  String? salesModel;
  String? authFlag;
  String? sellingPoint;
  String? marketEnable;
  dynamic goodsVideo;
  int? releaseTime;
  String? goodsType;
  int? skuSource;
  dynamic attrList;
  int? showWeight;
  bool? isPromotion;
  bool? isPlatformRecommend;

  Records({
    this.id,
    this.skuId,
    this.goodsName,
    this.storeId,
    this.storeName,
    this.buyCount,
    this.small,
    this.thumbnail,
    this.brandId,
    this.brandName,
    this.brandUrl,
    this.categoryPath,
    this.categoryNamePath,
    this.storeCategoryPath,
    this.storeCategoryNamePath,
    this.price,
    this.promotionPrice,
    this.point,
    this.commentNum,
    this.highPraiseNum,
    this.grade,
    this.intro,
    this.mobileIntro,
    this.selfOperated,
    this.recommend,
    this.salesModel,
    this.authFlag,
    this.sellingPoint,
    this.marketEnable,
    this.goodsVideo,
    this.releaseTime,
    this.goodsType,
    this.skuSource,
    this.attrList,
    this.showWeight,
    this.isPromotion,
    this.isPlatformRecommend,
  });

  Records.fromJson(Map<String, dynamic> json) {
    if (json["id"] is String) {
      id = json["id"];
    }
    if (json["skuId"] is String) {
      skuId = json["skuId"];
    }
    if (json["goodsName"] is String) {
      goodsName = json["goodsName"];
    }
    if (json["storeId"] is String) {
      storeId = json["storeId"];
    }
    if (json["storeName"] is String) {
      storeName = json["storeName"];
    }
    if (json["buyCount"] is num) {
      buyCount = (json["buyCount"] as num).toInt();
    }
    if (json["small"] is String) {
      small = json["small"];
    }
    if (json["thumbnail"] is String) {
      thumbnail = json["thumbnail"];
    }
    if (json["brandId"] is String) {
      brandId = json["brandId"];
    }
    brandName = json["brandName"];
    brandUrl = json["brandUrl"];
    if (json["categoryPath"] is String) {
      categoryPath = json["categoryPath"];
    }
    if (json["categoryNamePath"] is String) {
      categoryNamePath = json["categoryNamePath"];
    }
    if (json["storeCategoryPath"] is String) {
      storeCategoryPath = json["storeCategoryPath"];
    }
    storeCategoryNamePath = json["storeCategoryNamePath"];
    if (json["price"] is double) {
      price = (json["price"] as double).toDouble();
    }
    promotionPrice = json["promotionPrice"];
    point = json["point"];
    if (json["commentNum"] is num) {
      commentNum = (json["commentNum"] as num).toInt();
    }
    highPraiseNum = json["highPraiseNum"];
    if (json["grade"] is num) {
      grade = (json["grade"] as num).toInt();
    }
    if (json["intro"] is String) {
      intro = json["intro"];
    }
    if (json["mobileIntro"] is String) {
      mobileIntro = json["mobileIntro"];
    }
    if (json["selfOperated"] is bool) {
      selfOperated = json["selfOperated"];
    }
    if (json["recommend"] is bool) {
      recommend = json["recommend"];
    }
    if (json["salesModel"] is String) {
      salesModel = json["salesModel"];
    }
    if (json["authFlag"] is String) {
      authFlag = json["authFlag"];
    }
    if (json["sellingPoint"] is String) {
      sellingPoint = json["sellingPoint"];
    }
    if (json["marketEnable"] is String) {
      marketEnable = json["marketEnable"];
    }
    goodsVideo = json["goodsVideo"];
    if (json["releaseTime"] is num) {
      releaseTime = (json["releaseTime"] as num).toInt();
    }
    if (json["goodsType"] is String) {
      goodsType = json["goodsType"];
    }
    if (json["skuSource"] is num) {
      skuSource = (json["skuSource"] as num).toInt();
    }
    attrList = json["attrList"];
    if (json["showWeight"] is num) {
      showWeight = (json["showWeight"] as num).toInt();
    }
    if (json["isPromotion"] is bool) {
      isPromotion = json["isPromotion"];
    }
    if (json["isPlatformRecommend"] is bool) {
      isPlatformRecommend = json["isPlatformRecommend"];
    }
  }

  static List<Records> fromList(List<Map<String, dynamic>> list) {
    return list.map(Records.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["skuId"] = skuId;
    _data["goodsName"] = goodsName;
    _data["storeId"] = storeId;
    _data["storeName"] = storeName;
    _data["buyCount"] = buyCount;
    _data["small"] = small;
    _data["thumbnail"] = thumbnail;
    _data["brandId"] = brandId;
    _data["brandName"] = brandName;
    _data["brandUrl"] = brandUrl;
    _data["categoryPath"] = categoryPath;
    _data["categoryNamePath"] = categoryNamePath;
    _data["storeCategoryPath"] = storeCategoryPath;
    _data["storeCategoryNamePath"] = storeCategoryNamePath;
    _data["price"] = price;
    _data["promotionPrice"] = promotionPrice;
    _data["point"] = point;
    _data["commentNum"] = commentNum;
    _data["highPraiseNum"] = highPraiseNum;
    _data["grade"] = grade;
    _data["intro"] = intro;
    _data["mobileIntro"] = mobileIntro;
    _data["selfOperated"] = selfOperated;
    _data["recommend"] = recommend;
    _data["salesModel"] = salesModel;
    _data["authFlag"] = authFlag;
    _data["sellingPoint"] = sellingPoint;
    _data["marketEnable"] = marketEnable;
    _data["goodsVideo"] = goodsVideo;
    _data["releaseTime"] = releaseTime;
    _data["goodsType"] = goodsType;
    _data["skuSource"] = skuSource;
    _data["attrList"] = attrList;
    _data["showWeight"] = showWeight;
    _data["isPromotion"] = isPromotion;
    _data["isPlatformRecommend"] = isPlatformRecommend;
    return _data;
  }
}
